CREATE TABLE [dbo].[TMCAJA]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_CAJA] [dbo].[TD_VC_008] NOT NULL,
[DE_CAJA] [dbo].[TD_VC_050] NOT NULL,
[CO_MONE] [dbo].[TD_VC_003] NULL,
[TI_CORR_INEG] [dbo].[TD_VC_001] NULL,
[CO_ENTI] [dbo].[TD_VC_020] NULL,
[DE_ENTI] [dbo].[TD_VC_100] NULL,
[CO_CNTA_EMPR] [dbo].[TD_VC_020] NULL,
[TI_SITU] [dbo].[TD_VC_003] NULL,
[CO_CNTA_AUXI] [dbo].[TD_VC_020] NULL,
[ST_SALD_MAXI] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TMCAJA__ST_SALD___1A1FD08D] DEFAULT ('N'),
[IM_SALD_MAXI] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TMCAJA__IM_SALD___1B13F4C6] DEFAULT ((0)),
[ST_SALD_MINI] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TMCAJA__ST_SALD___1C0818FF] DEFAULT ('N'),
[IM_SALD_MINI] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TMCAJA__IM_SALD___1CFC3D38] DEFAULT ((0)),
[ST_MONT_EGRE] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TMCAJA__ST_MONT___1DF06171] DEFAULT ('N'),
[ST_DSCT] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TMCAJA__ST_DSCT__1EE485AA] DEFAULT ('N'),
[ST_VNTA_RRHH] [dbo].[TD_VC_001] NULL CONSTRAINT [DF__TMCAJA__ST_VNTA___1FD8A9E3] DEFAULT ('N'),
[ST_COPA] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TMCAJA__ST_COPA__20CCCE1C] DEFAULT ('N'),
[IM_MAXI_EGRE] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TMCAJA__IM_MAXI___21C0F255] DEFAULT ((0)),
[ST_VALD_DIST] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TMCAJA__ST_VALD___22B5168E] DEFAULT ('N'),
[ST_REND_GAST] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TMCAJA__ST_REND___23A93AC7] DEFAULT ('N'),
[ST_AUTO_EGRE] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TMCAJA__ST_AUTO___249D5F00] DEFAULT ('N'),
[CO_UNID_CONC] [dbo].[TD_VC_003] NULL,
[ST_CIER_DIAR] [dbo].[TD_VC_001] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TMCAJA__CO_USUA___25918339] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TMCAJA__FE_USUA___2685A772] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TMCAJA__CO_USUA___2779CBAB] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TMCAJA__FE_USUA___286DEFE4] DEFAULT (getdate()),
[ST_NOTA_CNTB] [dbo].[TD_VC_001] NULL CONSTRAINT [DF__TMCAJA__ST_NOTA___172433A8] DEFAULT ('N'),
[ST_CHEQ_DIFE] [dbo].[TD_VC_001_SINO] NULL
) ON [PRIMARY]
ALTER TABLE [dbo].[TMCAJA] ADD
CONSTRAINT [FK__TMCAJA__CO_EMPR__1DBC229E] FOREIGN KEY ([CO_EMPR]) REFERENCES [dbo].[TMPARA_TESO] ([CO_EMPR])
GO
ALTER TABLE [dbo].[TMCAJA] ADD CONSTRAINT [PK__TMCAJA__ABBCC2F83039FA35] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_CAJA]) ON [PRIMARY]
GO
